package com.engineering.elink.videodao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.engineering.elink.co.BaseCo;
import com.engineering.elink.domain.Chapter;
import com.engineering.elink.vo.ChapterVo;
import com.engineering.elink.vo.VideoVo;

public interface ChapterMapper {
    int deleteByPrimaryKey(Integer chapterId);

    int insert(Chapter record);

    int insertSelective(Chapter record);

    Chapter selectByPrimaryKey(Integer chapterId);

    int updateByPrimaryKeySelective(Chapter record);

    int updateByPrimaryKey(Chapter record);
    
    List<ChapterVo> selectByCourseId(Integer courseId);
    
    List<VideoVo> selectByChapterId(Integer chapterId);
   
    List<Integer> selectCourseId(Integer videoId);

    List<Chapter> selectAllChapter(Integer courseId);
    
    int getMaxSortId(@Param("parentId") Integer parentId,@Param("courseId") Integer courseId);
    
	List<VideoVo> getChapterByCourseId(@Param("co") BaseCo co, @Param("courseId")Integer courseId);
	
	int countChapterByCourseId(@Param("courseId")Integer courseId);
    
}